import random
n = input()
print n
def rdstr(l, r):
	t = random.randint(l, r)
	s = ''
	for i in range(t):
		s += "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"[random.randrange(62)]
	return s
for i in range(n):
	print random.randint(0, i), rdstr(6, 12)